﻿namespace Digitalmes.Application.Sys;

/// <summary>
/// 权限参数
/// </summary>
public sealed class SysAuthorityParam
{
    /// <summary>
    /// 角色Id
    /// </summary>
    public long RoleId { get; set; }

    /// <summary>
    /// 授权菜单列表
    /// </summary>
    [NotNull]
    public List<SysAuthorityMenu>? Menus { get; set; }
}

public sealed class SysAuthorityAdminByRoleParam
{
    /// <summary>
    /// 角色编号，可多个
    /// </summary>
    [NotNull]
    public List<long>? RoleArr { get; set; }

    /// <summary>
    /// 用户编号
    /// </summary>
    [NotNull]
    public List<long>? AdminArr { get; set; }
}

/// <summary>
/// 授权菜单列表
/// </summary>
public sealed class SysAuthorityMenu
{
    /// <summary>
    /// 菜单Id
    /// </summary>
    public long MenuId { get; set; }

    /// <summary>
    /// 授权的Api
    /// </summary>
    [NotNull]
    public List<SysMenuApiUrl>? Api { get; set; } = new();
}
